﻿using System;
using System.Collections.Generic;


namespace Jin.Core.Schema
{
    /// <summary>
    /// 列的关系
    /// </summary>
    public interface IRelation:IDBObject
    {
        /// <summary>
        /// 所属表
        /// </summary>
        ITable Table { get; }
        /// <summary>
        /// 名称
        /// </summary>
        string Name { get; }
        /// <summary>
        /// 加入的字段
        /// </summary>
        IColumn JoinKey { get; set; }
        /// <summary>
        /// 目标类型
        /// </summary>
        Type TargetType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        ITable TargetTable { get; set; }
        IColumn TargetJoinKey { get; set; }
        Qualifier Qualifier { get; set; }

    }
    /// <summary>
    /// 
    /// </summary>
    public enum Qualifier { 
    One,Many
    }
}
